package it.ma.musicplayernew.fonts;

import android.content.Context;
import android.graphics.Typeface;

/**
 * @author Nick
 * 
 */
public class FontsFactory {

	private static Typeface mTypefaceRoboto;
	private static Typeface mTypefaceHero;
	private static Typeface mTypefaceCanaro;

	public static void createRoboto(Context context) {

		mTypefaceRoboto = Typeface.createFromAsset(context.getAssets(),
				"fonts/Roboto-Light.ttf");
	}
	
	public static void createHero(Context context) {

		mTypefaceHero = Typeface.createFromAsset(context.getAssets(),
				"fonts/hero.ttf");
	}
	public static void createCanaro(Context context) {

		mTypefaceCanaro = Typeface.createFromAsset(context.getAssets(),
				"fonts/canaro_extra_bold.otf");
	}

	public static Typeface getRoboto(Context context) {
		if (mTypefaceRoboto == null) {
			createRoboto(context);
		}
		return mTypefaceRoboto;
	}
	
	public static Typeface getHero(Context context) {
		if (mTypefaceHero == null) {
			createHero(context);
		}
		return mTypefaceHero;
	}

	public static Typeface getCanaro(Context context) {
		if (mTypefaceCanaro == null) {
			createCanaro(context);
		}
		return mTypefaceCanaro;
	}
}
